/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package proyecto;

import java.awt.BorderLayout;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JWindow;

/**
 *
 * @author Jorge.gaspariano
 */
public class H2 extends JWindow implements Runnable {
    private int duracion;
   public  H2(int duracion){
       super();
            this.duracion=duracion;
     JPanel panel= (JPanel)getContentPane();
          ImageIcon img = new ImageIcon("masnatura2.jpg");
           panel.add(new JLabel(img));
         panel.add(new JLabel(img));
      setSize(630,420);
       setLocationRelativeTo(null);
       setVisible(true);
       try{
       Thread.sleep(duracion);
         Inicio in =new Inicio();
      in.setVisible(true);
       }catch(Exception ex)
       {
           ex.printStackTrace();
       }
       setVisible(false);
           
        
    }
   @Override
   public void run(){
       try{
            Thread.yield();
          
       }catch(Exception e){
       e.getStackTrace();
       }
       
   }
    
}
